from lib.net.index import wlan

def connect(domain, port):
    wlan.connect_server(domain, port)

def read(wait):
    wlan.wait_uart_data(wait)

def write(buf):
    return wlan.send_request(buf, 1000, "raw")

def disconnect():
    wlan.disconnect()